{% extends 'base.html' %}

{#页面标题#}
{%block title%}
    {{views_blog.title}}
{%endblock%}

{% block nav_blog_active%}active{% endblock %}>


{% load staticfiles %}
{%block header_extends%}
    <link rel="stylesheet" href="{%static 'blog/blog.css'%}">
{%endblock%}

{#页面内容#}
{%block content%}
    <div class="container">
        <div class="row">
            <div class="col-xs-10 col-xs-offset-1">
                    <h3>{{ views_blog.title }}</h3>
                    <ul class="blog-info-description">
                        <li>作者：{{ views_blog.author }}</li>
                        <li>分类：{{views_blog.blog_type.pk}}
                            <a href="{%url 'xxx' views_blog.blog_type.pk%}">
                                {{views_blog.blog_type}}
                            </a>
                        </li>
                        
                        <li>发表日期：{{ views_blog.created_time|date:'Y-m-d H:i:s' }}</li>
                        <li>阅读({{views_blog.get_read_num}})</li>
                    </ul>
                    <div class="blog-content">{{ views_blog.content|safe }}</div>
                    <div class = "blog-more">
                        <p>
                            上一篇
                            {% if views_previous_blog %}
                               <a href = "{% url 'urls_blog_detail' views_previous_blog.pk%}">{{views_previous_blog.title}}</a>
                            {% else %}
                                上面没有了
                            {%endif%}
                        </p>
                        <p>
                            下一篇
                            {% if views_next_blog %}
                               <a href = "{% url 'urls_blog_detail' views_next_blog.pk%}">{{views_next_blog.title}}</a>
                            {% else %}
                                下面没有了
                            {%endif%}
                        </p>
                    </div>
            </div>
        </div>
    </div>





{%endblock%}
<!-- 

<!DOCTYPE html>
<html>
<head>
    <meta charset='UTF-8'>
    <title>{{views_blog.title}}</title>
    
</head>
    <body>
        <div>
            <a href='{%url 'home'%}'>
                <h3>个人博客网站首页</h3>
            </a>
        </div>
        <h3>{{ views_blog.title }}</h3>
        <p>作者：{{ views_blog.author }}</p>
        <p>发表日期：{{ views_blog.created_time|date:'Y-m-d H:i:s' }}</p>
        <p>分类：
            <a href = "{ %url 'blogs_with_type' views_blog.blog_type.pk% }">
                {{views_blog.blog_type}}
            </a>
        </p>
        <p>{{ views_blog.content }}</p>
    </body>
</html>
-->
